/*
 *  smart_ptr.hpp
 *  objc_smart_ptr
 *
 *  Created by Homero Thomsom on 3/25/12.
 *  Copyright 2012 __MyCompanyName__. All rights reserved.
 *
 */

#ifndef SMART_PTR_HPP_
#define SMART_PTR_HPP_

template <typename T>
struct smart_ptr
{
	smart_ptr( T* ptr )
		: ptr_(ptr) 
	{
	}
	
	~smart_ptr()
	{
		[ptr_ release];
	}
	
	T& operator->()
	{
		return *ptr_;
	}

	T* get()
	{
		return ptr_;
	}	
	
	T* ptr_;
};


#endif // SMART_PTR_HPP_
